<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>layui的使用</title>
	<link rel="stylesheet" href="./layui/css/layui.css">
	<script type="text/javascript" src="./layui/layui.js"></script>
</head>
<body>
	<form class="layui-form" action="">
		用户名：<input type="text" placeholder="请输入标题" autocomplete="off" class="layui-input">
		性别：<input type="radio" value="男" title="男" name="sex">  <input type="radio" title="女" value="女" name="sex">
		城市：
		<select name="" id="">
			<option value="">广州</option>
			<option value="">深圳</option>
		</select>

		 <input type="checkbox" name="like[write]" title="写作">
  		<input type="checkbox" name="like[read]" title="阅读" checked>
      	<input type="checkbox" name="like[dai]" title="发呆">

      	<input type="checkbox" name="switch" lay-skin="switch">
      	<div id="box">
      		

      	</div>
      	 <div class="layui-progress layui-progress-big" lay-showPercent="yes">
		  <div class="layui-progress-bar layui-bg-green" lay-percent="70%"></div>
		</div>
		<input type="text" placeholder="请输入标题" autocomplete="off" class="layui-input" id="start">
		<input type="text" placeholder="请输入标题" autocomplete="off" class="layui-input" id="end">
		<div class="layui-form-item">
            <button class="layui-btn" lay-filter="*" lay-submit>
                立即发布
            </button>
        </div>
	</form>
	<script>
		//一般直接写在一个js文件中
		layui.use(['form','layedit','element','laydate'], function(){
			var form = layui.form();
			var layedit = layui.layedit;
			var element = layui.element();
			var laydate = layui.laydate;

			layedit.build('box', {
			  height: 180, //设置编辑器高度
			});

			

			 






			
		});
	</script> 
</body>
</html>	